<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    /* 子代用 > 来选择目标 */
    div > span {
        color: red;
    }
</style>
</head>
<body>
   <div>
    <span>儿子</span>
    <p>
        <span>孙子</span>
    </p>
   </div> 
</body>
</html>